home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Fatted Calf
/
The Fatted Calf.iso
/
Applications
/
Conversion
/
Convert_PICT
/
Source
/
UncommentedPSCode
/
Regions
< prev
next >
Wrap
Text File
|
1994-05-24
|
3KB
|
172 lines
%BEGIN Regions
/frameRgn
{
gsave
penPattern usePattern
/tempRight exch def
/tempBottom exch def
/tempLeft exch def
/tempTop exch def
/numShapes exch def
numShapes 0 eq
{
tempLeft tempTop tempRight tempTop
tempRight tempBottom tempLeft tempBottom
4
/numShapes 1 def
}
{
tempTop tempLeft tempBottom tempRight regionBounds
clip
}
ifelse
penWidth 0 le
penHeight 0 le
or
{
numShapes
{
{ pop pop }
repeat
}
repeat
}
{
newpath
numShapes
{
/numCoords exch 2 mul def
/ptArray numCoords array def
/firsty exch def
/firstx exch def
firstx firsty moveto
0 2 numCoords 3 sub % 3 is for: zero origin, and skipped first coords
{
/arrayIndex exch def
/y1 exch def
/x1 exch def
ptArray arrayIndex x1 put
ptArray arrayIndex 1 add y1 put
x1 y1 lineto
}
for
closepath
/pendx firstx penWidth add def
numCoords 4 gt
{
ptArray 2 get pendx lt
{ /pendy firsty penHeight add def }
{ /pendy firsty penHeight sub def }
ifelse
}
{ /pendy firsty penHeight sub def }
ifelse
/lastx ptArray 0 get def
/lasty ptArray 1 get def
pendx pendy moveto
2 4 numCoords 5 sub
{
/arrayIndex exch def
/thisx ptArray arrayIndex get def
/thisy ptArray arrayIndex 1 add get def
/pendx lastx penWidth
thisy lasty sub 0 gt {add} {sub} ifelse
def
pendx pendy lineto
/lastx thisx def
/lasty thisy def
/thisx ptArray arrayIndex 2 add get def
/thisy ptArray arrayIndex 3 add get def
/pendy lasty penHeight
thisx lastx sub 0 gt {sub} {add } ifelse
def
pendx pendy lineto
/lasty thisy def
/lastx thisx def
}
for
firstx penWidth add pendy lineto
closepath
}
repeat
eofill
}
ifelse
grestore
}
def
/paintRgn
{
gsave
penPattern usePattern
regionBounds
/numShapes exch def
numShapes 0 eq
{ fill }
{
clip
numShapes regionPath
eofill
}
ifelse
grestore
}
def
/eraseRgn
{
gsave
backPattern usePattern
regionBounds
/numShapes exch def
numShapes 0 eq
{ fill }
{
clip
numShapes regionPath
eofill
}
ifelse
grestore
}
def
/invertRgn
{
gsave
regionBounds
regionPath
grestore
} def
/fillRgn
{
gsave
fillPattern usePattern
regionBounds
/numShapes exch def
numShapes 0 eq
{ fill }
{
clip
numShapes regionPath
eofill
}
ifelse
grestore
}
def
/frameSameRgn
{ }
def
/paintSameRgn
{ }
def
/eraseSameRgn
{ }
def
/invertSameRgn
{ }
def
/fillSameRgn
{ }
def
%END Regions